package com.homework.oop;

public class Car extends Auto {
  private String airConditioning;
  private String CD;

  public Car(int tires, String color, int weight, int speed, String airConditioning, String CD) {
    super(tires, color, weight, speed);
    this.airConditioning = airConditioning;
    this.CD = CD;
  }

  @Override
  public void speedUp(int n1) {
    System.out.println("油门坏了，无法加速");
  }

  @Override
  public void speedDown(int n1) {
    System.out.println("刹车坏了 也无法刹车。。。");
  }

  @Override
  public String toString() {
    String Basic = super.toString();
    return Basic + "  还拥有：{airConditioning='" + airConditioning + '\'' + ", CD='" + CD + '\'' + '}';
  }

  public static void main(String[] args) {
    Auto a1 = new Auto(3, "black", 500, 50);
    System.out.println(a1);
    Car c1 = new Car(4, "green", 1000, 100, "格力小空调", "正在播放>>分手快乐");
    System.out.println(c1);
  }
}
